package io.kiki.sba.registry.common.model;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
public class Response implements Serializable {

    private static final long serialVersionUID = 1L;

    private boolean success;

    private String message;


    public Response() {
    }


    public Response(boolean success, String message) {
        this.success = success;
        this.message = message;
    }


    public static Response buildSuccessResponse() {
        return new Response(true, "");
    }


    public static Response buildSuccessResponse(String msg) {
        return new Response(true, msg);
    }


    public static Response buildFailedResponse(String msg) {
        return new Response(false, msg);
    }


}
